package lyq.spec.edu.practical;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.TextView;
import android.widget.Toast;

import java.net.IDN;

public class ActivityObtained extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_obtained);

        WebView webView = (WebView)findViewById(R.id.web_view); //second_layout中的TextView的id;
        Intent intent = getIntent();
        //获取数据
        String Content = intent.getStringExtra("Message");
        //设置数据


        webView.setInitialScale(140);
        //Content = Content.replaceAll("","")  //全部替换
        Content = Content.replace("/api/resources/upload/images", "http://www.yyjsx.xyz/api/resources/upload/images");
        webView.loadDataWithBaseURL( null, Content , "text/html", "UTF-8", null ) ;

        /*WebSettings settings = webView.getSettings();
        settings.setUseWideViewPort(true);
        settings.setLoadWithOverviewMode(true);*/

    }
}
